February 1996

Configuring a remote PPP dial-up client for Solaris 2.x

Are you looking for a solution to your Solaris 2.x connectivity problems? If so, you'll probably want to consider configuring the Point to Point Protocol (PPP) on your Solaris system. PPP is an industry standard protocol, like TCP/IP, for transferring network packets over a point-to-point link. The PPP package is included in the operating system of Solaris 2.3 and above.

In the article "Configuring PPP under Solaris 2.x" in the October 1995 issue of Inside Solaris, we described how to configure your system as a PPP host. In this article, we'll demonstrate how to configure your Solaris system as a PPP dial-up client.

Getting started

When configuring PPP on your Solaris system as a dial-up client, you should first check to make sure that the PPP packages are installed. To do so, type the command

# pkginfo |egrep 'ppp|bnu'

at a command prompt and press [Enter]. If the correct PPP packages are installed, you should see them listed as shown in Figure A. If the appropriate PPP packages aren't listed, you should use the pkgadd or swmtool command to install them from your system CD-ROM.

Once you've made sure that your system has PPP installed, you'll need to check the serial port configuration on your Solaris system. If you use a Sun workstation, be sure to set your EEPROM settings for your serial port. Make sure you set the ignore-cd parameter to true for bidirectional modem connections. If your workstation has only one serial port labeled A (ttya), you can check its configuration with command

#/usr/sbin/eeprom |grep ttya

When you enter this command, you should see the default values

ttya-rts-dtr-off=false

ttya-ignore-cd=true

ttya-mode=9600,8,n,1,-

If this is the case, you only need to change the mode settings on your serial port to match the modem speed. If you intend to use a 14.4K or 28.8K modem, enter the command

#/usr/sbin/eeprom ttya-mode=38400,8,n,1,h

This configures the serial port to perform at optimum speed with a 14.4K or 28.8K modem. Once you've set your serial port configuration on your Sun workstation, you must reboot for the changes to take effect.

If you're using a Solaris x86 system for dial-up purposes, you should use admintool to configure your local serial port. The Serial Port Manager will create the necessary files for your serial port configuration. When you use the Serial Port Manager to configure your port, make sure to use the Bidirectional template when you create the device, as shown in Figure B.

Many hardware manufacturers include the serial port configuration in the system ROM-BIOS settings. These settings can affect whether your modem will perform at optimum speed. Set any serial port ROM-BIOS settings to the highest allowed by the computer-usually 38.4K baud or higher. If your system's ROM-BIOS doesn't contain baud rate settings for your serial ports, you can skip this step when preparing your system.

PPP client files

When you configure your Solaris system as a PPP dial-up client, you'll need to configure several files in order for your PPP link to work properly. First, let's look at the programs that PPP uses, and then we'll look at the files that only dial-up clients use to connect to your PPP host system.

When discussing the components of PPP, it's easy to think of the programs and configuration files that comprise PPP in layers. The primary layer is the PPP link manager daemon

/usr/sbin/aspppd

This daemon initiates PPP connections. When packets are queued for a PPP interface not connected to your system, the link manager attempts to connect to the host interface.

When the link manager loads into system memory, it checks the PPP second layer, which contains the configuration file

/etc/asppp.cf

This file defines the characteristics of PPP interfaces connected to your system. These characteristics include

You can see these settings in the sample configuration file /etc/asppp.cf shown in Figure C. Make sure that all host names in the ifconfig and peer_system_name lines in your configuration file are added to your client's /etc/hosts file.

When packets queue up for a PPP interface not connected currently to your system, the link manager contacts the PPP interface using the third layer, made up of three files in the UUCP communications package. These three files

/etc/uucp/Systems

/etc/uucp/Devices

/etc/uucp/Dialers

are used by client systems only to connect to PPP hosts.

The /etc/uucp/Systems file contains system definitions for PPP hosts. These definitions include the baud rate, phone number, and login chat script for each system. When the PPP link manager initiates a dial-out connection, it checks the configuration file /etc/asppp.cf for the peer_system_name setting and matches that name with the system definition in /etc/uucp/Systems.

All entries in the /etc/uucp/Systems file must follow the format

MACHINENAME TIME TYPE CLASS PHONE LOGIN

When a host system matches the peer_ system_name setting, the link manager then uses the file /etc/uucp/Devices to match a device with the third field in the /etc/uucp/Systems file. The link manager then passes the matched information to the /etc/uucp/Dialers file. This file contains the dialer needed to initialize a modem and dial the phone number defined in the /etc/uucp/Systems file. All of this activity, although transparent to the user, must be configured properly for a connection to take place.

Configuring your PPP client

For configuring PPP on a client system, we'll assume that you'll configure a home user whose only interface will be the PPP link. The user's system will communicate with the PPP host located at the user's office. In this example configuration for a PPP client, we'll use the following information:

The first step you should take in configuring your client is to install your Solaris system as a networked system. For your naming service, you should use the selection OTHER. You should not use NIS or NIS+ as your naming service. If you've already installed Solaris, you can manually change your configuration files on a Sun workstation or run sys-unconfig on an x86 system.

Once you configure your client system settings, remove the file /etc/hostname.le0 to prevent the system from using it as the default interface. The primary interface will be the PPP interface that will configure when the PPP daemon loads. Make sure that the hostname in /etc/nodename corresponds to the IP address of the PPP link and is spelled correctly.

The next step is to create the appropriate PPP configuration file entries in /etc/asppp.cf. Using our sample information, the /etc/asppp.cf file should look like the one shown in Figure D. After you make these changes to /etc/asppp.cf, you'll need to create two files.

In the /etc directory on your client system, create the file defaultrouter with the single entry

140.244.96.200 #ip gateway

In addition, create the file resolv.conf with the entries

domain office.com

nameserver 140.244.96.1

which define your PPP host's domain name and DNS nameserver IP address. Now you're ready to configure the file /etc/nsswitch.conf so that it recognizes your naming service as DNS.

Copy the file /etc/nsswitch.files to the filename /etc/nsswitch.conf using the cp command. Edit the hosts: line in /etc/nsswitch.conf so that it reads

hosts: files dns

Next, you'll need to configure your modem port using the admintool Serial Port Manager, which we described earlier. Once you've done this, the only thing left to do is to configure your /etc/uucp configuration files.

The Systems file in /etc/uucp must contain an entry that matches the peer_system_name entry configured in the /etc/asppp.cf file. Using our sample information, the Systems file should contain an entry for widget2 that looks like this:

widget2 Any ACU 9600 phonenumber "" P_ZERO "" \n login:-\r\n\c-login:-\r\n\c-login-
EOT-login: loginname ssword:loginpasswd

The third field in the Systems file entry for widget2 defines the device type in the /etc/uucp/Devices file. If you're using a Hayes or Hayes-compatible modem, you can use ACU as the device type entry. For more reliable connections, be sure to read your modem manual and determine any special settings for creating a customized dial string. For the best possible connections, always set your modem as follows:

Checking your PPP connection

Once you've configured your PPP client files, you're ready to check for any problems with your connection. This process is commonly referred to as debugging. In order to turn on the PPP debugging feature, you'll first need to stop the PPP daemon on your host. To stop the daemon, use the command

# /etc/init.d/asppp stop

Once you've stopped the daemon, you can then edit the file /etc/init.d/asppp and change the line

/usr/sbin/aspppd -d 1

to

/usr/sbin/aspppd -d 9

When you start the daemon back up with the command

/etc/init.d/asppp start

the debugging feature will be turned on.

A good method for debugging individual connections if you use OpenWindows or the Common Desktop Environment would be to open two windows on your desktop. In one window, enter the command

# tail -f /etc/log/asppp.log

This will show the PPP log file as it continually updates with debug messages. In the second window, run the PPP daemon after you turn on the debug feature. If the daemon starts properly, the log window will show a message similar to

10:30:00 Link manager (88) started 1/9/96

10:30:01 parse_config_file: Successful configuration

Using this two-window debugging setup, you can check every facet of your PPP connection. If you want to check the dial-out procedures on your client, you can use your command window to dial to the host system with the command

# ping (systemname)

The log window should show the system being dialed using the files in the /etc/uucp directory.

Conclusion

Getting PPP connections working can be a tricky business. If you use the guidelines we've provided for setting up a PPP client for dial-out connections to a PPP host, you should be able to avoid some of the headaches associated with this administrative task. In this article, we discussed how to set up a PPP client under Solaris 2.3 and higher. We also showed you how to debug your own system once you've configured your PPP connections.


[Return to Index for Inside Solaris - February 1996 Issue]

Copyright (c) 1996 The Cobb Group, a division of Ziff-Davis Publishing Company. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of Ziff-Davis Publishing Company is prohibited. The Cobb Group and The Cobb Group logo are trademarks of Ziff-Davis Publishing Company.

Inside Solaris is a publication of The Cobb Group.
1-800-223-8720